#include "pch.h"
#include "Expression.h"

namespace mbase {

//Expression^ Expression::operator+(Expression^ e) { return ref new PlusExpression(this, e); }
//Expression^ Expression::operator+(int e) { return ref new PlusExpression(this, ref new AtomicExpression(ref new IntValue(e))); }
//Expression^ Expression::operator+(float e) { return ref new PlusExpression(this, ref new AtomicExpression(ref new FltValue(e))); }
//Expression^ Expression::operator+(String^ e) { return ref new PlusExpression(this, ref new AtomicExpression(ref new StringValue(e))); }

Expression^ Expression::operator==(Expression^ e) { return ref new EqualExpression(this, e); }
Expression^ Expression::operator==(int e) { return ref new EqualExpression(this, ref new AtomicExpression(ref new IntValue(e))); }
Expression^ Expression::operator==(float e) { return ref new EqualExpression(this, ref new AtomicExpression(ref new FltValue(e))); }
Expression^ Expression::operator==(String^ e) { return ref new EqualExpression(this, ref new AtomicExpression(ref new StringValue(e))); }

Expression^ Expression::operator!=(Expression^ e) { return ref new NotEqualExpression(this, e); }
Expression^ Expression::operator!=(int e) { return ref new NotEqualExpression(this, ref new AtomicExpression(ref new IntValue(e))); }
Expression^ Expression::operator!=(float e) { return ref new NotEqualExpression(this, ref new AtomicExpression(ref new FltValue(e))); }
Expression^ Expression::operator!=(String^ e) { return ref new NotEqualExpression(this, ref new AtomicExpression(ref new StringValue(e))); }

Expression^ Expression::operator<(Expression^ e) { return ref new LessExpression(this, e); }
Expression^ Expression::operator<(int e) { return ref new LessExpression(this, ref new AtomicExpression(ref new IntValue(e))); }
Expression^ Expression::operator<(float e) { return ref new LessExpression(this, ref new AtomicExpression(ref new FltValue(e))); }
Expression^ Expression::operator<(String^ e) { return ref new LessExpression(this, ref new AtomicExpression(ref new StringValue(e))); }

Expression^ Expression::operator>(Expression^ e) { return ref new GreaterExpression(this, e); }
Expression^ Expression::operator>(int e) { return ref new GreaterExpression(this, ref new AtomicExpression(ref new IntValue(e))); }
Expression^ Expression::operator>(float e) { return ref new GreaterExpression(this, ref new AtomicExpression(ref new FltValue(e))); }
Expression^ Expression::operator>(String^ e) { return ref new GreaterExpression(this, ref new AtomicExpression(ref new StringValue(e))); }

Expression^ Expression::operator<=(Expression^ e) { return ref new LessEqualExpression(this, e); }
Expression^ Expression::operator<=(int e) { return ref new LessEqualExpression(this, ref new AtomicExpression(ref new IntValue(e))); }
Expression^ Expression::operator<=(float e) { return ref new LessEqualExpression(this, ref new AtomicExpression(ref new FltValue(e))); }
Expression^ Expression::operator<=(String^ e) { return ref new LessEqualExpression(this, ref new AtomicExpression(ref new StringValue(e))); }

Expression^ Expression::operator>=(Expression^ e) { return ref new GreaterEqualExpression(this, e); }
Expression^ Expression::operator>=(int e) { return ref new GreaterEqualExpression(this, ref new AtomicExpression(ref new IntValue(e))); }
Expression^ Expression::operator>=(float e) { return ref new GreaterEqualExpression(this, ref new AtomicExpression(ref new FltValue(e))); }
Expression^ Expression::operator>=(String^ e) { return ref new GreaterEqualExpression(this, ref new AtomicExpression(ref new StringValue(e))); }

Expression^ Expression::operator!() { return ref new NotExpression(this); }
Expression^ Expression::operator&&(Expression^ e) { return ref new AndExpression(this, e); }
Expression^ Expression::operator||(Expression^ e) { return ref new OrExpression(this, e); }

}
